﻿
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sharp.Domain.PlatformBoundedContext.PlatformModule.Aggregates;

namespace Sharp.Domain.PlatformBoundedContext.ModelConfigurations
{
    public partial class AuditLogConfiguration
        : EntityTypeConfiguration<AuditLog>
    {
        public AuditLogConfiguration()
        { 
            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
             

            Property(t => t.OriginalValue)
                .IsMaxLength()
                .IsOptional();

            Property(t => t.NewValue)
                .IsMaxLength()
                .IsOptional();
        }
    }
}

